From: Ian Jackson Date: Thu, 16 Jan 2014 16:40:05 +0000 (+0000) Subject: libxl: fork: Break out childproc_reaped_ours X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5616 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=2231205419d38024f65a8e4066e34d204f5ce13a;p=xen.git libxl: fork: Break out childproc_reaped_ours We're going to want to do this again at a new call site. No functional change. Signed-off-by: Ian Jackson Cc: Jim Fehlig Cc: Ian Campbell Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c index 2252370a11..7b84765bd1 100644 --- a/tools/libxl/libxl_fork.c +++ b/tools/libxl/libxl_fork.c @@ -290,6 +290,14 @@ static int perhaps_installhandler(libxl__gc *gc, bool creating) return 0; } +static void childproc_reaped_ours(libxl__egc *egc, libxl__ev_child *ch, + int status) +{ + LIBXL_LIST_REMOVE(ch, entry); + ch->pid = -1; + ch->callback(egc, ch, ch->pid, status); +} + static int childproc_reaped(libxl__egc *egc, pid_t pid, int status) { EGC_GC; @@ -303,9 +311,7 @@ static int childproc_reaped(libxl__egc *egc, pid_t pid, int status) return ERROR_UNKNOWN_CHILD; found: - LIBXL_LIST_REMOVE(ch, entry); - ch->pid = -1; - ch->callback(egc, ch, pid, status); + childproc_reaped_ours(egc, ch, status); perhaps_removehandler(gc);